home *** CD-ROM | disk | FTP | other *** search
/ Programming Microsoft Visual Basic .NET / Programming Microsoft Visual Basic .NET (Microsoft Press)(X08-78517)(2002).bin / setup / vbnet / 26 web services / mathservice / mathservice.asmx
Encoding:
ASP WebService Directive File  |  2002-01-25  |  656 b   |  24 lines

  1. <%@ WebService Language="VB" Class="MathService" %>
  2.  
  3. Imports System
  4. Imports System.Web.Services
  5.  
  6. < WebService (Description:="Yet another math web service", _
  7.     Namespace:="www.vb2themax.com") > _
  8. Public Class MathService
  9.     Inherits WebService
  10.  
  11.     < WebMethod (Description:="Add two Integers") > _
  12.     Public Function Add(ByVal n1 As Integer, Byval n2 As Integer) _
  13.         As Integer
  14.         return n1 + n2
  15.     End Function
  16.  
  17.     < WebMethod (Description:="Subtract two Integers") > _
  18.     Public Function Subtract(ByVal n1 As Integer, Byval n2 As Integer) _
  19.         As Integer
  20.         return n1 - n2
  21.     End Function
  22.  
  23. End Class 
  24.